import struct
from app.sio_agv.agv_socket import AGV
from app.core.conf import ST
from loguru import logger


if __name__=='__main__':
    tt15 = AGV(ST.AGV1_IP,ST.AGV_PORT)
    # 首先抢占控制权
    # raw_msg = struct.pack('!BBHLH6s', 0x5A, 0x01, 0x04,
    #                           msg_len, msg_type, b'\x00\x00\x00\x00\x00\x00')

    raw_msg = b'\x5a\x01\x00\x1a\x00\x00\x00\x04\x13\x7b\x13\x7b\x00\x00\x00\x02\x7b\x20\x20\7d'
    tt15.send_raw('unknown',raw_msg)
    res = tt15.receive('unknown')
    logger.debug(res);

    
    
